// 任务类型定义
export interface Task {
  id: string;
  title: string;
  completed: boolean;
  createdAt: string;
}

// 新闻类型定义
export interface News {
  id: string;
  title: string;
  content: string;
  publishTime: string;
}

// 用户类型定义
export interface User {
  id: string;
  name: string;
  email: string;
  avatar: string;
}

// React Navigation 类型定义
export type RootStackParamList = {
  MainTabs: undefined;
  Settings: undefined;
  NewsDetail: { news: News };
  PomodoroTimer: { initialMinutes?: number; initialSeconds?: number; presetName?: string };
  TimerSettings: undefined;
};

export type TabParamList = {
  Home: undefined;
  Todo: undefined;
  News: undefined;
  Profile: undefined;
};

// 页面类型
export type PageType = 'Home' | 'Todo' | 'News' | 'Profile';

// 导航Props类型
import type { BottomTabScreenProps } from '@react-navigation/bottom-tabs';
import type { CompositeScreenProps } from '@react-navigation/native';
import type { NativeStackScreenProps } from '@react-navigation/native-stack';

export type TabScreenProps<T extends keyof TabParamList> = CompositeScreenProps<
  BottomTabScreenProps<TabParamList, T>,
  NativeStackScreenProps<RootStackParamList>
>;
